<style>
	.text-upload{display: inline-block;position: absolute;left: 49%;cursor: pointer;z-index: 0;font-weight: bold;margin-top:8px;}
</style>
<div class="hidden OptionTitle">添加</div>
<div class="hidden OptionBtn">保存</div>
<form class="checkoutform" action="{:U('insert')}" method="post">
  <!--<div class="form-group"  data-position="bottom" data-intro="填写日志标题" >-->
    <!--<label class="control-label">标题</label>-->
    <!--<input class="form-control" datatype="*" name="title" type="text" errormsg="标题限制于文本" nullmsg="标题不能为空" placeholder="请输入标题！" id="title">-->
  <!--</div>-->
    <div class="form-group" data-position="bottom" data-intro="填写日志内容" >
        <textarea class="form-control" datatype="*" name="content" nullmsg="内容不能为空" errormsg="内容限制于文本" placeholder="请输入内容！" cols="50" rows="6" id="content"></textarea>
    </div>
  <if condition="$infocategorylist">
      <div class="form-group"  data-position="bottom" data-intro="选择日志分类" >
        <select name="infocategory_id" class="form-control">
            <volist name="infocategorylist" id="vo">
                <option value="{$vo.id}">{$vo.title}</option>
            </volist>
        </select>
      </div>
  </if>
  <div class="text-upload">点击上传附件</div> 
  <iframe src="{:U('upload')}" name="uploadiframe" appendto="#filebox" id="uploadiframe" class="uploadiframe pull-right" style="height:40px; width:60%;" filename="img_url[]"  data-position="bottom" data-intro="此处添加附件"></iframe>
<div class="clearfix"></div>
<div id="filebox" class="dropzone"></div> 
</form>  
<script>
	$("#filebox").bind("DOMNodeInserted",function(e){
		$.ThinkBox.success('上传成功',{'delayClose':1000,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
	});
	$(".text-upload").click(function(e) {
        document.getElementById('uploadiframe').contentWindow.$(".dropzone").click();
    });
</script>